# Version: 1.0.0
FROM ubuntu:16.04
MAINTAINER Lizhen "lizhen@example.com"

# 覆盖原文件
ADD sources.list /etc/apt/sources.list

RUN apt-get update
RUN ["apt-get", "install", "-y", "nginx"]
RUN echo 'Hi, I am in the container' > /usr/share/nginx/html/index.html
EXPOSE 80

# 创建虚拟机default
# docker-machine create --driver virtualbox default
# 初始化客户端的环境为default，按照说明操作
# docker-machine env default
# 使用缓存构建
# sudo docker build -t lizhen/ngin_demo .
# 禁用缓存构建
# sudo docker --no-cache build -t lizhen/ngin_demo .
# nginx前端运行并公开端口
# sudo docker run -d -p 4000:80 --name nginx_demo lizhen/ngin_demo nginx -g "daemon off;"